import request from "@/utils/request";
import type { ResponseType } from "@/utils/type";
import { List } from "antd";
import Staer from "../pages/manage/Star";
import Trash from "../pages/manage/Trash";

const url = {
  List: "/questionnaire/list",
  Star: "/questionnaire/star",
  Trash: "/questionnaire/delete",
  Recover: "/questionnaire/recover",
};

export const getQuestionnaireList = async (params: any) => {
  return request.get(url.List, {
    params,
  });
};

export const getQuestionnaireStar = async (params: any) => {
  return request.get(url.Star, {
    params,
  });
};
export const getQuestionnaireTrash = async (params: any) => {
  return request.get(url.Trash, {
    params,
  });
};
export const putQuestionnaire = async (data: any) => {
  return request.put(url.List, data);
};
export const putRecoverQuestionnaire = async (data: any) => {
  return request.put(url.Recover, data);
};
export default {
  getQuestionnaireList,
  getQuestionnaireStar,
  getQuestionnaireTrash,
  putQuestionnaire,
  putRecoverQuestionnaire,
};
